using System;
using System.Globalization;
using System.Windows.Data;

namespace TodoLister.Converters
{
    /// <summary>
    /// 布尔值转角度转换器
    /// </summary>
    public class BoolToAngleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool isExpanded)
            {
                return isExpanded ? 45 : 0;
            }
            return 0;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
} 